home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
texthook
/
texthook.frm
< prev
next >
Wrap
Text File
|
1995-09-06
|
3KB
|
112 lines
VERSION 2.00
Begin Form Main
BackColor = &H00C0C0C0&
Caption = "TXTHOOK.DLL 'No Hide' DEMO"
ClientHeight = 3360
ClientLeft = 1725
ClientTop = 2145
ClientWidth = 5820
Height = 3765
Left = 1665
LinkMode = 1 'Source
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 3360
ScaleWidth = 5820
Top = 1800
Width = 5940
Begin TextBox Text1
Height = 2060
Left = 120
MultiLine = -1 'True
TabIndex = 0
Text = "Text1"
Top = 1200
Width = 5535
End
Begin CommandButton Command4
Caption = "UnHook "
Height = 500
Left = 4320
TabIndex = 4
Top = 480
Width = 1335
End
Begin CommandButton Command3
Caption = "Bitmap Caret"
Height = 500
Left = 2880
TabIndex = 3
Top = 480
Width = 1335
End
Begin CommandButton Command2
Caption = "OverStrike"
Height = 500
Left = 1560
TabIndex = 2
Top = 480
Width = 1215
End
Begin CommandButton Command1
Caption = "SetHook First"
Height = 500
Left = 120
TabIndex = 1
Top = 480
Width = 1335
End
Begin Label Label1
Alignment = 2 'Center
Caption = "Highlight some text and then press 'SetHook First'"
Height = 260
Left = 240
TabIndex = 5
Top = 120
Width = 5415
End
End
Declare Function LoadBitmap Lib "User" (ByVal hInstance As Any, ByVal lpBitmapName As Any) As Integer
Declare Sub SetTextHook Lib "txthook.dll" (ByVal hWnd As Integer, ByVal hWnd As Integer)
Declare Sub TextOverstrike Lib "txthook.dll" (ByVal bSwitch As Integer)
Declare Sub CaretBitmap Lib "txthook.dll" (ByVal hBitmap As Integer)
Declare Sub UndoTextHook Lib "txthook.dll" (ByVal Zero As Integer)
Declare Function GetFocus Lib "User" () As Integer
Const OBM_MNARROW = 32739
Const TRUE = -1
Const FALSE = 0
Sub Command1_Click ()
Text1.SetFocus
Text1wnd% = GetFocus()
Call SetTextHook(Text1wnd%, hWnd)
Form2.Show 1
End Sub
Sub Command2_Click ()
Call TextOverstrike(True)
End Sub
Sub Command3_Click ()
BitH% = LoadBitmap(0&, OBM_MNARROW)
Call CaretBitmap(BitH%)
End Sub
Sub Command4_Click ()
Call UndoTextHook(0)
End Sub
Sub Form_Click ()
Form2.Show 1
End Sub
Sub Form_Load ()
Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
A$ = "Uh, just one more question. Yes, what is it Columbo? "
For X = 1 To 5
A$ = A$ + A$
Next
Text1.Text = A$
End Sub